package com.cxs.vo;

import lombok.Getter;
import lombok.Setter;

/**
 * @Project: postman-demo
 * @Author: cxs2014501@163.com
 * @Create: 2022/11/8 13:49
 * @Description: 案例所需，自己定制
 **/
@Setter
@Getter
public class R {
    private Integer code;
    private String msg;
    private Object data;
    private String env;
    private Integer port;

    public static R resOk(String env, Integer port){
        R r = new R();
        r.setCode(200);
        r.setMsg("操作成功");
        r.setData(null);
        r.setEnv(env);
        r.setPort(port);
        return r;
    }

    public static R resOk(String msg, Object t, String env, Integer port){
        R r = new R();
        r.setCode(200);
        r.setMsg(msg);
        r.setData(t);
        r.setEnv(env);
        r.setPort(port);
        return r;
    }
}
